package com.knowledge.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.knowledge.common.annotation.Excel;
import com.knowledge.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * 人与AI对话消息对象 sys_message
 *
 * @author zhaoyk
 * @date 2025-09-26
 */
@Data
@TableName(value = "sys_message")
public class SysMessage {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @TableField(value = "messageId")
    private Long messageId;
    /**
     * "设备ID"
     */
    @Excel(name = "设备ID")
    @TableField(value = "deviceId")
    private String deviceId;

    /**
     * "deviceName"
     */
    @Excel(name = "deviceName")
    @TableField(value = "deviceName")
    private String deviceName;


    /**
     * "会话ID"
     */
    @Excel(name = "会话ID")
    @TableField(value = "sessionId")
    private String sessionId;
    /**
     * "${comment}"
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    @TableField(value = "documentTypeName")
    private String documentTypeName;
    /**
     * "${comment}"
     */
    @TableField(value = "documentTypeId")
    private String documentTypeId;
    /**
     * "消息发送方：user-用户，assistant-人工智能"
     */
    @Excel(name = "消息发送方：user-用户，assistant-人工智能")
    private String sender;
    /**
     * "AI扮演的角色ID"
     */
    @Excel(name = "AI扮演的角色ID")
    @TableField(value = "roleId")
    private Long roleId;
    /**
     * "消息内容"
     */
    @Excel(name = "消息内容")
    private String message;
    /**
     * "消息类型"
     */
    @Excel(name = "消息类型")
    @TableField(value = "messageType")
    private String messageType;
    /**
     * "语音文件路径"
     */
    @Excel(name = "语音文件路径")
    @TableField(value = "audioPath")
    private String audioPath;
    /**
     * "状态：1-有效，0-删除"
     */
    @Excel(name = "状态：1-有效，0-删除")
    private String state;
    /**
     * "答中状态 1 答中 2 未答中"
     */
    @Excel(name = "答中状态 1 答中 2 未答中")
    @TableField(value = "dzStatus")
    private String dzStatus;
    // 1 推送消息  0 否
    @TableField(value = "isPush")
    private String isPush;


    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "createTime")
    private Date createTime;


    /**
     * 创建时间
     */
    @TableField(exist = false)
    private int count;

    /**
     * 最后出现时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date lastTime;


    /**
     * AI 回复
     */
    @TableField(exist = false)
    private SysMessage reply;

    @TableField(exist = false)
    private String bcRemark;


    /**
     * 用户Id
     */
    @TableField(exist = false)
    private String userId;

    @TableField(exist = false)
    private List<String> roleList;

    @TableField(exist = false)
    private List<String> typeList;

    // 1 设备  2 web
    @TableField(exist = false)
    private String type;

    // 1 今日  2 本周  3 本月
    @TableField(exist = false)
    private String dateType;


    @TableField(exist = false)
    private String noDeviceId;


    // 开始时间
    @TableField(exist = false)
    private String startTime;
    // 结束时间
    @TableField(exist = false)
    private String endTime;

    @TableField(exist = false)
    private String replyDocumentTypeName;


}
